﻿using FriendStar.Code;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using FriendStar.Application.VBaseData;
using FriendStar.Domain.Entity.VBaseData;

namespace FriendStar.Web.Areas.VBaseData.Controllers
{
    public class V_CPK_11_DJ_StoRegisterController : ControllerBase
    {
        private V_CPK_11_DJ_StoRegisterApp cpk_11_DJ_StoRegisterApp = new V_CPK_11_DJ_StoRegisterApp();

        [HttpGet]
        [HandlerAjaxOnly]
        public ActionResult GetGridJson(Pagination pagination, string FHappenCompanyNO, string FProductionNO, string BeginFCurDate,string EndFCurDate, string FVoucherNo,string type)
        {
            var data = cpk_11_DJ_StoRegisterApp.GetListRegIn(pagination, FHappenCompanyNO, FProductionNO, BeginFCurDate, EndFCurDate, FVoucherNo, type);
            return Content(data.ToJson());
        }

        [HttpGet]
        [HandlerAjaxOnly]
        public ActionResult GetGridJsonForPick(Pagination pagination, string FHappenCompanyNO, string FProductionNO, string BeginFCurDate, string EndFCurDate, string FVoucherNo, string type)
        {
            var data = cpk_11_DJ_StoRegisterApp.GetListForPick(pagination, FHappenCompanyNO, FProductionNO, BeginFCurDate, EndFCurDate, FVoucherNo, "CC");
            return Content(data.ToJson());
        }
    }
}
